package com.kafka.conf;

import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.server.ServerProperties;

import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import com.fasterxml.jackson.jaxrs.xml.JacksonXMLProvider;

/**
 * jersey配置
 */
public class MyApplication extends ResourceConfig {
	public MyApplication() {
		packages("com.kafka.service");
		property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
		JacksonJsonProvider json = new JacksonJsonProvider().configure(
				SerializationFeature.INDENT_OUTPUT, true);
		register(json);
		JacksonXMLProvider xml = new JacksonXMLProvider().configure(
				SerializationFeature.INDENT_OUTPUT, true);
		register(xml);

	}

}
